<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <title>{$metaTitle ?? 'static7'}-后台管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="__STATIC__/css/layui.css">
    <link rel="stylesheet" href="__CSS__/main.css" media="all">
    {block name="css"}{/block}
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo logo">
            <img src="__IMG__/7_bai.png" alt="layui">
        </div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        {notempty name="systemMenus.main"}
        <ul class="layui-nav layui-layout-left">
            {volist name='systemMenus.main' id='vo'}
                <li class="layui-nav-item {$vo.class ?? ''}"><a href="{:Url::build($vo['url'] ?? '#')}">{$vo.title ?? ''}</a></li>
            {/volist}
        </ul>
        {/notempty}
        <ul class="layui-nav layui-layout-right">
            <!--<li class="layui-nav-item"><a href="{:Url::build('Test/config')}" target="_blank">打印配置</a></li>-->
            <li class="layui-nav-item"><a href="{:Url::build('Index/clearRuntime')}">清除缓存</a></li>
            <!--<li class="layui-nav-item"><a href="">通知(<strong style="color: red;">12</strong>)</a></li>-->
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="{:portrait()}" class="layui-nav-img">
                    {:Session::get('user_auth.username')}
                </a>
                <dl class="layui-nav-child">
                    <dd><a class="personal" href="{:Url::build('Personal/portrait')}">修改头像</a></dd>
                    <dd><a class="personal" href="{:Url::build('Personal/updatePassword')}">修改密码</a></dd>
                    <dd><a class="personal" href="{:Url::build('Personal/updateNickname')}">修改昵称</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="{:Url::build('Login/logout')}">退出</a></li>
        </ul>
    </div>
    {block name="left"}
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll highlight">
            {notempty name="systemMenus.child"}
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="left_url">
                {notempty name="systemMenus.child"}
                    {volist name='systemMenus.child' id='child'}
                        <li class="layui-nav-item layui-nav-itemed">
                            <a class="" href="javascript:;">{$key}</a>
                            <dl class="layui-nav-child">
                                {volist name='child' id='v'}
                                <dd><a href="javascript:void(0);" class="" data-url="{:Url::build($v['url']?? '#')}">{$v.title ??
                                    ''}</a></dd>
                                {/volist}
                            </dl>
                        </li>
                    {/volist}
                {/notempty}
            </ul>
            {/notempty}
        </div>
    </div>
    {/block}
    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div class="m15">
            {block name="body"}{/block}
        </div>
    </div>
    {block name="footer"}
    <div class="layui-footer">
        <!-- 底部固定区域 -->
        Copyright <strong>static7</strong> &copy; 2017
    </div>
    {/block}
</div>
{block name="hide"}{/block}
<script type="text/javascript" src="__STATIC__/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="__STATIC__/common/common.js" charset="utf-8"></script>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=63771393" charset="UTF-8"></script>
<script type="text/javascript">
    layui.use('element', function () {
        layui.element.on('nav(left_url)', function (elem) {
            layui.layer.load(2);
            window.location.href = elem.children('a').attr('data-url');
        });
        layui.$('.personal').on('click',function () {
            layui.$.get(this.href, function (str) {
                if (str.code === 0) {
                    return alert_msg(str.msg);
                }
                pop_up=layui.layer.open({
                    type: 1,
                    title: "详情",
                    area: '550px',
                    content: str
                });
            });
            return false;
        });
    });
</script>
{block name="script"}{/block}
</body>
</html>